package de.fhhof.robot.control.cmd.concreate;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import de.fhhof.robot.control.AWorkFlowCommand;
import de.fhhof.robot.control.CmdState;
import de.fhhof.robot.control.IMessage;

public class AssemblyState implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private IMessage assemblyMessage;
	
	private boolean isAssemblyRunning;
	
	private boolean ack1Sent;
	
	private boolean ack2Sent;
	
	private boolean colorCmdExist;
	
	private List<AWorkFlowCommand> cmdList;
	
	private MessageState msgSmartiesAvState;
	private MessageState msgPutEmptyPalateToRobot;
	private MessageState msgRemovePalateFromRobot;
	private int lastColor;
	
	private boolean isOperatorComfirmed;
	private boolean isEmptyPalleteExist;
	private boolean smartyPalleteRemoved;
	private List<IMessage> msgs = null;
	
	protected CmdState cmdState;
	
	private Long cmdId;
	private Long startTime;
	private boolean isTimeStored;
	

	public AssemblyState() {
		this.ack1Sent = false;
		this.ack2Sent = false;
		this.colorCmdExist = false;
		this.isAssemblyRunning = false;
		this.assemblyMessage = null;
		this.isEmptyPalleteExist = false;
		this.isOperatorComfirmed = false;
		this.smartyPalleteRemoved = false;
		this.msgs = new ArrayList<IMessage>();
		this.cmdState = new CmdState();
		this.msgSmartiesAvState = new MessageState();
		this.msgPutEmptyPalateToRobot = new MessageState();
		this.msgRemovePalateFromRobot = new MessageState();
		this.startTime = 0L;
		this.isTimeStored = false;
	}

	public boolean isAck1Sent() {
		return ack1Sent;
	}

	public void setAck1Sent(boolean ack1Sent) {
		this.ack1Sent = ack1Sent;
	}

	public boolean isAck2Sent() {
		return ack2Sent;
	}

	public void setAck2Sent(boolean ack2Sent) {
		this.ack2Sent = ack2Sent;
	}

	public boolean isColorCmdExist() {
		return colorCmdExist;
	}

	public void setColorCmdExist(boolean colorCmdExist) {
		this.colorCmdExist = colorCmdExist;
	}

	public List<AWorkFlowCommand> getCmdList() {
		return cmdList;
	}

	public void setCmdList(List<AWorkFlowCommand> cmdList) {
		this.cmdList = cmdList;
	}

	@Override
	public String toString() {
		return "AssemblyState [ack1Sent=" + ack1Sent + ", ack2Sent=" + ack2Sent
				+ ", colorCmdExist=" + colorCmdExist + ", cmdList=" + cmdList
				+ "]";
	}

	public Long getCmdId() {
		return cmdId;
	}

	public void setCmdId(Long cmdId) {
		this.cmdId = cmdId;
	}

	public boolean isAssemblyRunning() {
		return isAssemblyRunning;
	}

	public void setAssemblyRunning(boolean isAssemblyRunning) {
		this.isAssemblyRunning = isAssemblyRunning;
	}

	public IMessage getAssemblyMessage() {
		return assemblyMessage;
	}

	public void setAssemblyMessage(IMessage assemblyMessage) {
		this.assemblyMessage = assemblyMessage;
	}

	public boolean isOperatorComfirmed() {
		return isOperatorComfirmed;
	}

	public void setOperatorComfirmed(boolean isOperatorComfirmed) {
		this.isOperatorComfirmed = isOperatorComfirmed;
	}

	public boolean isEmptyPalleteExist() {
		return isEmptyPalleteExist;
	}

	public void setEmptyPalleteExist(boolean isEmptyPalleteExist) {
		this.isEmptyPalleteExist = isEmptyPalleteExist;
	}

	public boolean isSmartyPalleteRemoved() {
		return smartyPalleteRemoved;
	}

	public void setSmartyPalleteRemoved(boolean smartyPalleteRemoved) {
		this.smartyPalleteRemoved = smartyPalleteRemoved;
	}

	public List<IMessage> getMsgs() {
		return msgs;
	}

	public void setMsgs(List<IMessage> msgs) {
		this.msgs = msgs;
	}

	public CmdState getCmdState() {
		return cmdState;
	}

	public void setCmdState(CmdState cmdState) {
		this.cmdState = cmdState;
	}

	public MessageState getMsgSmartiesAvState() {
		return msgSmartiesAvState;
	}

	public void setMsgSmartiesAvState(MessageState msgSmartiesAvState) {
		this.msgSmartiesAvState = msgSmartiesAvState;
	}

	public int getLastColor() {
		return lastColor;
	}

	public void setLastColor(int lastColor) {
		this.lastColor = lastColor;
	}

	public MessageState getMsgPutEmptyPalateToRobot() {
		return msgPutEmptyPalateToRobot;
	}

	public void setMsgPutEmptyPalateToRobot(MessageState msgPutEmptyPalateToRobot) {
		this.msgPutEmptyPalateToRobot = msgPutEmptyPalateToRobot;
	}

	public MessageState getMsgRemovePalateFromRobot() {
		return msgRemovePalateFromRobot;
	}

	public void setMsgRemovePalateFromRobot(MessageState msgRemovePalateFromRobot) {
		this.msgRemovePalateFromRobot = msgRemovePalateFromRobot;
	}

	public Long getStartTime() {
		return startTime;
	}

	public void setStartTime(Long startTime) {
		this.startTime = startTime;
	}

	public boolean isTimeStored() {
		return isTimeStored;
	}

	public void setTimeStored(boolean isTimeStored) {
		this.isTimeStored = isTimeStored;
	}
	
	
}
